import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', () => {
  let count = ref(0)
  const doubleCount = computed(() => count.value * 2)
  //所有岗位
  const tableData = ref([])
  const los = ref(false)
  const infos = ref({})
  function get_jobs(data) {
    tableData.value = data
  }

  function get_info(data) {
    infos.value = data
  }
  function set_los(data) {
    los.value = data
  }
  function increment(data) {
    count.value = data
  }

  return { count, doubleCount,tableData,get_jobs,increment,infos,get_info,los,set_los }
})
